package com.wngbms.multidatasource.init;

import com.alibaba.fastjson.JSON;
import com.wngbms.multidatasource.config.TConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
//@Component
public class Ib implements InitializingBean {

    @Autowired
    TConfig tConfig;

    // 先调用
    @Override
    public void afterPropertiesSet() throws Exception {
        log.info("after: {}", JSON.toJSONString(tConfig));
    }

    // 后调用
    public void init() {
        log.info("init");
    }

}
